fun main(args : Array<String>){
    //for 
	for(i in 1..10){
		print("$i,")
	}
	println("\n")
	
	var array = arrayOf(1,3,4,6)
	for((index, value) in array.withIndex()){
		println("$index is $value")
	}
	
	//while     do ... while 
	var a = 3
	while(a > 1){
		println("$a")
		a--
	}
	
	do{
		println("a = $a")
		a++
	}while(a < 4)
	
	//return break  continue
	xx()
	for(j in 1..10){
		println("break j = $j")
		if(j == 4){break}
	}
	
	for(x in 1..10){
		if(x in 3..5){continue}
		println("continue x = $x")
	}
	
	array.forEach(fun(value:Int){
		println(value)
	})
	
	
}

//return 
fun xx(){
	for(i in 1..10){
		if(i ==3){return}
		println("xx i = $i")
	}
}

